C:\to_server\website\mrdcl-learning.com\mrdcl_files\DAT-02\run8.stp
start data,
serial number in columns 1,2,3,
card characters binary 1000,
ck ct($13:1..4)/1,
!same as
ck ct($13:1234)/1,
!same check but allows you to list what you like
if ct($13:1..4)/n1,el $12.$13,
!same as above check but listing only and not editing
!editing means any failing records are not rejected from IDF
if ct($13:1..4)/n1,list $12.$13,
!
ck ct($13,$14,$15:1..3)/1,
!This checks all codes on 13 and 14 and codes 1 thru 3 on 15
ck 'Here is a message'.$13/1 = ct($14:1..6)/1,
!This checks that if 13=1 then 14 must be single between 1 and 6 AND ALSO
!it checks that if 13/not 1 then 14/not 1 to 6
ck $13/s, !Checks whole column is single
ck $13/m, !Check it is multi
ck $13/nm, !Checks not multi
ck $13/b, !Check that it is blank
ck $13/nb, !Check that it is not blank
dm $q1=$15/1-9, !Spontaneous answers
dm $q2=$16/1-9, !Prompted answers
dm $check=$q1.and..not.$q2,
if $check/nb,el $15.$16,
!This will list out any answers which are given spontaneous but not prompted
dm $q1=$15/1-9,
dm $q2=$16/1-9,
dm $check=$q1.and.$q2,
if $check/nb,el $15.$16,
!This checks that no codes appear on both the spontaneous and prompted
di $total=$11-12 + $13-14 + $15-16 + $17-18,
if $total/n100,el $11-12.$13-14.$15-16.$17-18,
!This checks that numbers add to 100%
!
ds $mostoften=$15-16/1-50,
dm $allbrands=$17/1-9,0,$18/1-9,0,$19/1-9,0,$20/1-9,0,$21/1-9,0,
dm $check2=$mostoften.and..not.$allbrands,
if $check2/nb,el $15-16.$17.$18.$19.$20.$21,
!Checks that most often brand which is two digit code is replicated amongst binary code in relevant code
!
if $14/9,ck ct($13:1..90,$14:1..8)/0,
!Checks that if 14=9 (eg None of these) that other codes are blank
!
ck $12-12.ne.$13-13,
ck $12-12.ne.$14-14,
ck $12-12.ne.$15-15,
ck $12-12.ne.$16-16,
ck $12-12.ne.$17-17,
ck $13-13.ne.$14-14,
ck $13-13.ne.$15-15,
ck $13-13.ne.$16-16,
ck $13-13.ne.$17-17,
ck $14-14.ne.$15-15,
ck $14-14.ne.$16-16,
ck $14-14.ne.$17-17,
ck $15-15.ne.$16-16,
ck $15-15.ne.$17-17,
ck $16-16.ne.$17-17,
!Checks one rank order code does not appear in more than one place
ordm $check3=$12/1-6,
ordm $check3=$13/1-6,
ordm $check3=$14/1-6,
ordm $check3=$15/1-6,
ordm $check3=$16/1-6,
ordm $check3=$17/1-6,
if $check3/2.n1,el $12.$13.$14.$15.$16.$17,
if $check3/3.n2,el $12.$13.$14.$15.$16.$17,
if $check3/4.n3,el $12.$13.$14.$15.$16.$17,
if $check3/5.n4,el $12.$13.$14.$15.$16.$17,
if $check3/6.n5,el $12.$13.$14.$15.$16.$17,
!Checks that sensible rank order is present, ie. if rank order 2 there must be a rank order 1
finish data,
